<template>
  <div>
    <a-modal
      title="地图"
      :visible="visible"
      @ok="handleOK"
      @cancel="visible = false"
    >
    <gd-map ref="map"></gd-map>
    </a-modal>
  </div>
</template>
<script>
import GdMap from "./GdMap.vue"
export default {
  name:"GdMapDlg",
  components:{
      GdMap
  },
  data() {
    return {
      visible: false,
      funSave: null,
      owner: null,
    };
  },
  methods: {
    ShowMapDlg(funSave, owner) {
      this.visible = true;
      this.funSave = funSave;
      this.owner = owner;
    },
    handleOK() {
      if (this.funSave) {
        this.funSave(this.$refs.map, this.owner);
      }
      this.visible = false;
    },
  },
};
</script>